<?php
class Khoa_hoc extends Khoahoc{
    static function getTypeKhoahoc(){
  		$sql = Yii::app()->db->createCommand('select * from tbl_khoahoc');
		$type = CHtml::listData($sql->queryAll(), 'id', 'khoahoc_ten');
		return $type;
    }     
    
    static function getName($id){
        $name = Khoahoc::model()->findByPk($id);
        return $name->khoahoc_ten;
    }
    
    static function getCode($id){
        $name = Khoahoc::model()->findByPk($id);
        return $name->khoahoc_ma;
    }
}

?>